#include"tree.h"
void test01() {
	BTNode* root1 = (BTNode*)malloc(sizeof(BTNode));
	root1->data = 1;
	BTNode* root2 = (BTNode*)malloc(sizeof(BTNode));
	root2->data = 2;
	BTNode* root3 = (BTNode*)malloc(sizeof(BTNode));
	root3->data = 3;
	BTNode* root4 = (BTNode*)malloc(sizeof(BTNode));
	root4->data = 4;
	BTNode* root5 = (BTNode*)malloc(sizeof(BTNode));
	root5->data = 5;
	BTNode* root6 = (BTNode*)malloc(sizeof(BTNode));
	root6->data = 6;
	BTNode* root7= (BTNode*)malloc(sizeof(BTNode));
	root7->data = 7;
	root1->left = root3;
	root1->right = root2;
	root3->left = root6;
	root3->right = root5;
	root2->left = root4;
	root2->right = NULL;
	root5->left = NULL;
	root5->right = NULL;
	root6->left = NULL;
	root6->right = NULL;
	root4->left = root7;
	root4->right = NULL;
	root7->left = NULL;
	root7->right = NULL;
	
	PreOrder(root1);
	int ret = BinaryTreeSize(root1);
	int ret1 = BinaryTreeLeafSize(root1);
	int ret2 = BinaryTreeLevelSize(root1, 1);
	int ret3 = BinaryTreeDepth(root1);
	printf("\n%d\n", ret3);
	BinaryTreeDestroy(&root1);
}
int main() {
	test01();
	return 0;
}